home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / books.arc / REGREPT.PRG < prev    next >
Text File  |  1985-04-17  |  1KB  |  58 lines

  1. * regrept.prg
  2. * Update check regster file and print it.
  3. erase
  4. ? "Updating register file..."
  5.  
  6. * send all written, nonregistered check transactions
  7. * from the trans file to a temp file
  8. use trans
  9. copy to temp for written .and. .not.;
  10.  registered .and. type = 1
  11. repl all registered with T for written .and .not.;
  12.  registered .and. type = 1
  13.  
  14. * Update register from temp file.
  15. use register
  16. appe from temp
  17.  
  18. * sum checks and deposits.
  19. sum amount for .not. deposit to expense
  20. sum amount for deposit to income
  21.  
  22. * Ask about date range and printer.
  23. erase
  24. store "        " to start,finish
  25. store " " to yn,cond
  26.  
  27. @ 3,2 say "Enter starting date " get start pict "99/99/99"
  28. @ 4,2 say "Enter ending date " get finish pict "99/99/99"
  29. @ 6,2 say "Send to printer (Y/N) " get YN pict "!"
  30. read
  31.  
  32. * Set printer on if requested.
  33. if yn = "Y"
  34.    set print on
  35. endif (yn = y)
  36. set eject off
  37.  
  38. * Print the report using register.frm
  39. eras 
  40. repo form register for date >= start .and.;
  41.  date <= finish
  42. ?
  43. ?
  44. ? "  Balance        ",income-expense
  45.  
  46. set print off
  47.  
  48. * If report not going to printer, pause.
  49. if yn <> "Y"
  50.    ?
  51.    ?
  52.    ? "Press any key to continue....."
  53.    wait
  54. endif ( yn <> Y)
  55.  
  56. release income,expense,yn,start,finish
  57. retu
  58.